package com.jyc.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**拓展SpringMVC***/
//@Configuration
/*@EnableWebMvc*/
public class MyMvcConfig implements WebMvcConfigurer {
    //拓展SpringMVC，是访问/或/index.html时，可以找到templates下的login.html
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("toList");
        registry.addViewController("/index.html").setViewName("toList");
    }
}
